package com.jackstraw.jack_base.datasource.mybatis.entity.po;

import com.jackstraw.jack_base.datasource.mybatis.base.entity.po.PoExample;
import com.jackstraw.jack_base.util.JsonUtil;
import com.jackstraw.jack_base.util.ObjectUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;


/**
 * 用户表	实体层PoExample
 *
 * @author jack 945514650@qq.com
 * @since version:1.0 generatorDate:2022-05-21 21:29:36
 */
public class UserPoExample extends PoExample<UserPoExample.Criteria, UserPo> {

	public UserPoExample() {
		super();
	}

	@Override
	public void addKey(Map<String, Object> params) {
		UserPo po = JsonUtil.mapToBean(params, this.poClass);
		if (ObjectUtil.ObjectUtilByLang3.isNotEmpty(po)) {
			if (ObjectUtil.ObjectUtilByLang3.isNotEmpty(po.getId())) {
				this.createCriteria().andIdEqualTo(po.getId());
			}
 		}
	}

	@Override
	protected Criteria createCriteriaInternal() {
		return new Criteria();
	}


	protected abstract static class GeneratedCriteria {
		protected List<Criterion> criteria;

		protected GeneratedCriteria() {
			super();
			criteria = new ArrayList<Criterion>();
		}

		public boolean isValid() {
			return criteria.size() > 0;
		}

		public List<Criterion> getAllCriteria() {
			return criteria;
		}

		public List<Criterion> getCriteria() {
			return criteria;
		}

		protected void addCriterion(String condition) {
			if (condition == null) {
				throw new RuntimeException("Value for condition cannot be null");
			}
			criteria.add(new Criterion(condition));
		}

		protected void addCriterion(String condition, Object value, String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property + " cannot be null");
			}
			criteria.add(new Criterion(condition, value));
		}

		protected void addCriterion(String condition, Object value1, Object value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property + " cannot be null");
			}
			criteria.add(new Criterion(condition, value1, value2));
		}

		public Criteria andIdIsNull() {
			addCriterion("id is null");
			return (Criteria) this;
		}

		public Criteria andIdIsNotNull() {
			addCriterion("id is not null");
			return (Criteria) this;
		}

		public Criteria andIdEqualTo(String value) {
			addCriterion("id =", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdNotEqualTo(String value) {
			addCriterion("id <>", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdGreaterThan(String value) {
			addCriterion("id >", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdGreaterThanOrEqualTo(String value) {
			addCriterion("id >=", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdLessThan(String value) {
			addCriterion("id <", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdLessThanOrEqualTo(String value) {
			addCriterion("id <=", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdIn(List<String> values) {
			addCriterion("id in", values, "id");
			return (Criteria) this;
		}

		public Criteria andIdNotIn(List<String> values) {
			addCriterion("id not in", values, "id");
			return (Criteria) this;
		}

		public Criteria andIdBetween(String value1, String value2) {
			addCriterion("id between", value1, value2, "id");
			return (Criteria) this;
		}

		public Criteria andIdNotBetween(String value1, String value2) {
			addCriterion("id not between", value1, value2, "id");
			return (Criteria) this;
		}

		public Criteria andIdLike(String value) {
			addCriterion("id like", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdNotLike(String value) {
			addCriterion("id not like", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdLikeInsensitive(String value) {
			addCriterion("upper(id) like", value.toUpperCase(), "id");
			return (Criteria) this;
		}


		public Criteria andLastNameIsNull() {
			addCriterion("last_name is null");
			return (Criteria) this;
		}

		public Criteria andLastNameIsNotNull() {
			addCriterion("last_name is not null");
			return (Criteria) this;
		}

		public Criteria andLastNameEqualTo(String value) {
			addCriterion("last_name =", value, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameNotEqualTo(String value) {
			addCriterion("last_name <>", value, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameGreaterThan(String value) {
			addCriterion("last_name >", value, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameGreaterThanOrEqualTo(String value) {
			addCriterion("last_name >=", value, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameLessThan(String value) {
			addCriterion("last_name <", value, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameLessThanOrEqualTo(String value) {
			addCriterion("last_name <=", value, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameIn(List<String> values) {
			addCriterion("last_name in", values, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameNotIn(List<String> values) {
			addCriterion("last_name not in", values, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameBetween(String value1, String value2) {
			addCriterion("last_name between", value1, value2, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameNotBetween(String value1, String value2) {
			addCriterion("last_name not between", value1, value2, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameLike(String value) {
			addCriterion("last_name like", value, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameNotLike(String value) {
			addCriterion("last_name not like", value, "lastName");
			return (Criteria) this;
		}

		public Criteria andLastNameLikeInsensitive(String value) {
			addCriterion("upper(last_name) like", value.toUpperCase(), "lastName");
			return (Criteria) this;
		}


		public Criteria andEmailIsNull() {
			addCriterion("email is null");
			return (Criteria) this;
		}

		public Criteria andEmailIsNotNull() {
			addCriterion("email is not null");
			return (Criteria) this;
		}

		public Criteria andEmailEqualTo(String value) {
			addCriterion("email =", value, "email");
			return (Criteria) this;
		}

		public Criteria andEmailNotEqualTo(String value) {
			addCriterion("email <>", value, "email");
			return (Criteria) this;
		}

		public Criteria andEmailGreaterThan(String value) {
			addCriterion("email >", value, "email");
			return (Criteria) this;
		}

		public Criteria andEmailGreaterThanOrEqualTo(String value) {
			addCriterion("email >=", value, "email");
			return (Criteria) this;
		}

		public Criteria andEmailLessThan(String value) {
			addCriterion("email <", value, "email");
			return (Criteria) this;
		}

		public Criteria andEmailLessThanOrEqualTo(String value) {
			addCriterion("email <=", value, "email");
			return (Criteria) this;
		}

		public Criteria andEmailIn(List<String> values) {
			addCriterion("email in", values, "email");
			return (Criteria) this;
		}

		public Criteria andEmailNotIn(List<String> values) {
			addCriterion("email not in", values, "email");
			return (Criteria) this;
		}

		public Criteria andEmailBetween(String value1, String value2) {
			addCriterion("email between", value1, value2, "email");
			return (Criteria) this;
		}

		public Criteria andEmailNotBetween(String value1, String value2) {
			addCriterion("email not between", value1, value2, "email");
			return (Criteria) this;
		}

		public Criteria andEmailLike(String value) {
			addCriterion("email like", value, "email");
			return (Criteria) this;
		}

		public Criteria andEmailNotLike(String value) {
			addCriterion("email not like", value, "email");
			return (Criteria) this;
		}

		public Criteria andEmailLikeInsensitive(String value) {
			addCriterion("upper(email) like", value.toUpperCase(), "email");
			return (Criteria) this;
		}

	}

	public static class Criteria extends GeneratedCriteria {

		protected Criteria() {
			super();
		}
	}
}